Package-level declarations
Extensions of built-in types (e.g. Either
, Option
, etc)
Types
Functions
The Validated type doesn't natively support flatMap because of the monad laws that it breaks. But this is what flatMap would do if it were allowed. We've called it concatMap because the Kotlin compiler will want to wire in the Monad flatMap extension instead and confusion reigns.
Constructs a flattened list without Nones
Applies a function that produces an Option to a NonEmptyList. The result is None if the resulting list would be empty, otherwise Some(NonEmptyList).
Returns a list containing only the non-None results of applying the given transform function to each element in the original collection.
Returns the first successful either, otherwise the last failure
Returns this
if it's a Some, otherwise returns the other
instance
Map a function that returns an Either across the NonEmptyList.
Map a function that returns an Option across the NonEmptyList.
Map a function that returns an Either across the Option.
Map a function that returns an Iterable across the Option.
Returns an Either of a list of B results of applying the given transform function to each element(A) in the original collection.
Returns an Option of a list of B results of applying the given transform function to each element(A) in the original collection.
Synonym for traverse((A)-> Either
Synonym for traverse((T)-> Either
Synonym for traverse((A)-> Either
Synonym for traverse((A)-> Option): Option
Synonym for traverse((A)-> Option): Option
Synonym for traverse((A)-> Option): Option>
Given a mapping function and an error message, return either the result of the function in a ValidNel if the function completes successfully, or the error message in an InvalidNel.
Retry a suspended supplier of an ErrorOr until a maximum number of times or a predicate has been fulfilled.
Retry a suspended supplier until a maximum number of times or a predicate has been fulfilled.